import request from '@/utils/request'

/**
 * 库区信息分页查询
 * @param {查询条件} data
 */
export function pageFacWhse(query) {
	return request({
		url: 'FacManage/FacWhse/pageList',
		method: 'get',
		params: query,
	})
}

/**
 * 库区管理树查询
 */
export function treeFacWhse(query) {
	return request({
		url: 'FacManage/FacWhse/treeList',
		method: 'get',
		params: query,
	})
}


/**
 * 新增库区信息
 * @param data
 */
export function addFacWhse(data) {
	return request({
		url: 'FacManage/FacWhse',
		method: 'post',
		data: data,
	})
}
/**
 * 修改库区信息
 * @param data
 */
export function updateFacWhse(data) {
	return request({
		url: 'FacManage/FacWhse',
		method: 'PUT',
		data: data,
	})
}
/**
 * 获取库区信息详情
 * @param {Id}
 */
export function getFacWhse(id) {
	return request({
		url: 'FacManage/FacWhse/' + id,
		method: 'get'
	})
}

/**
 * 删除库区信息
 * @param {主键} pid
 */
export function delFacWhse(pid) {
	return request({
		url: 'FacManage/FacWhse/delete',
		method: 'POST',
		data: pid
	})
}
